Skip to content

Support OSRAM lights on ZHA#11522

Merged
balloob merged 1 commit into
devfrom
zha-light-osram-support
Jan 11, 2018
Merged

Support OSRAM lights on ZHA#11522
balloob merged 1 commit into
devfrom
zha-light-osram-support

Conversation

@emlove
Copy link
Copy Markdown
Contributor

@emlove emlove commented Jan 8, 2018

Description:

These bulbs are on an older version of the ZCL specification that doesn't support the color_capabilities attribute. This PR makes sure the supported_features for these devices are calculated properly.

Fixes #10036

Caveat: I haven't tested this on a light that doesn't support color_capabilities (uses the new branch) and also doesn't support color_temperature.

@emlove emlove force-pushed the zha-light-osram-support branch from 8b2f02f to 3a26da6 Compare January 8, 2018 00:04
@home-assistant home-assistant deleted a comment from houndci-bot Jan 8, 2018
@balloob balloob merged commit 3bc6a7d into dev Jan 11, 2018
@balloob balloob deleted the zha-light-osram-support branch January 11, 2018 21:56
@balloob balloob mentioned this pull request Jan 11, 2018
# determine if the device supports color temperature.
discovery_info['color_capabilities'] = CAPABILITIES_COLOR_XY
result = yield from safe_read(
endpoint.light_color, ['color_temperature'])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks any lights which do not have a light_color attribute. I'm putting a fix together now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah damn. My mistake.

Probably what we should do is move most of this logic out of the constructor and into setup. Then this could be properly nested under the color cluster logic:

https://github.com/home-assistant/home-assistant/blob/079d4039a10b819a0378580f7cb749959fe8ed43/homeassistant/components/light/zha.py#L83-L96

@rcloran rcloran mentioned this pull request Jan 15, 2018
9 tasks
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants